#include "te_local.h"

char const *cmdFlagNames[] = {
	"INIT",
	"CHEAT",
	"DEVELOPER",
	"ENGINE",
	"RENDERER",
	"SOUND",
	"INPUT",
	"NETWORK",
	"GAME",
	NULL
};

char const *cvarFlagNames[] = {
	"BOOL",
	"INTEGER",
	"FLOAT",
	"ENUM",
	"UNLINKED",
	"MODIFIED",
	"ARCHIVE",
	"ROM",
	"INIT",
	"CHEAT",
	"DEVELOPER",
	"MAPRESTART",
	"VIDRESTART",
	"SNDRESTART",
	"ENGINE",
	"RENDERER",
	"SOUND",
	"INPUT",
	"NETWORK",
	"GAME",
	"NETSYNC",
	"BROWSERFEED",
	"SERVERINFO",
	"CLIENT",
	NULL
};

// Includes the dot (so "bleh.jpg" would return ".jpg")
char *COM_GetFileExtension ( const char *path )
{
	std::string pathString(path);
	return const_cast<char *>(pathString.substr(pathString.find_last_of(".")).c_str());
}